<?php
namespace app\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
        'area' => 'require',
        'username' => 'require|unique:user',
        'tradepass' => 'require|length:6',
        'password' => 'require|length:6,12',
        'code' => 'require|length:6',
        'invite_code' => 'require',
    ];

    protected $message = [
        'username.require' => '必须填写账号',
        'username.unique'  => '账号已经注册',
        'password.require' => '密码必须填写',
        'password.length'  => '请设置6-12位登陆密码',
        'code.require'     => '验证码不能为空',
        'tradepass.require'     => '交易密码不能为空',
        'tradepass.length'     => '请设置6位交易密码',
        'invite_code.require' => '邀请码不能为空',
        'area.require' => '请选择地区',
    ];

}


